Skip to content

perf(size): Remove per-binary full GC - #676

Merged
jamieQ merged 1 commit into
mainfrom
perf/remove-manual-gc
Sep 10, 2026
Merged

perf(size): Remove per-binary full GC#676
jamieQ merged 1 commit into
mainfrom
perf/remove-manual-gc

Conversation

@jamieQ

@jamieQ jamieQ commented Sep 10, 2026

Copy link
Copy Markdown
Member

The explicit python gc collection appears to scale poorly when processing apps with many binaries. I tested against an app with ~300 binaries, and the gc.collect() duration kept increasing over time taking up meaningful amounts of CPU time. This was particularly noticeable prior to allowing concurrent binary processing, as the garbage collection pauses in some cases could end up taking nearly half the overall binary analysis time. Even after the concurrent binary analysis processing change, this change still appeared to reduce overall wall time a bit and reduce CPU use without causing a meaningful regression in peak memory use.

The theory about the mechanism is that the heap keeps growing as we process lots of binaries (which is unavoidable to some extent though we're not currently trying very hard to mitigate that I don't think), and the gc scans therefore take longer over time.

Allow Python's normal collector policy to avoid repeated full-heap scans as binary analysis results accumulate.
@sentry

sentry Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
HackerNews com.emergetools.hackernews 3.8 (1) Release

Android

🔗 App Name App ID Version Configuration
Hacker News com.emergetools.hackernews 1.0.2 (13) Release

⚙️ launchpad-test-android Build Distribution Settings

@sentry

sentry Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Size Analysis

1 component analyzed, 1 component processing

iOS Builds

Name Configuration Version Download Size Install Size
HackerNews (iOS)
com.emergetools.hackernews
Release 3.8 (1) 6.5 MB (0 B) 9.7 MB (0 B)

Android Builds

Name Configuration Version Download Size Uncompressed Size
Hacker News (Android)
com.emergetools.hackernews
Release 1.0.2 (13) Processing... (-) Processing... (-)

Configure launchpad-test-ios status check rules

@jamieQ
jamieQ marked this pull request as ready for review September 10, 2026 14:45

@chromy chromy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jamieQ
jamieQ merged commit e512822 into main Sep 10, 2026
26 checks passed
@jamieQ
jamieQ deleted the perf/remove-manual-gc branch September 10, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants